1. Field
The following description relates to a technique of extracting cascading style sheet (CSS) rules that may be applied to document object model (DOM) nodes that are included in a DOM node tree.
2. Description of the Related Art
With the development of techniques for processing and storing considerable amounts of data, various document formats for storing data have been developed. For example, data may be stored in word-processor documents, spreadsheet files, database files, portable document format (PDF) files, image documents, plain text files, and the like.
Documents may be written using various markup languages, for example, a Standard Generalized Markup Language (SGML), a Hyper Text Markup Language (HTML), an eXtensible Markup Language (XML), and the like. As the types of document formats diversify, the ability to share various types of data has become increasingly more complicated. In order to address this problem, the use of markup languages for structured non-systematic data and/or documents have been introduced.
Style sheets define the general style of web documents such as text, links, images, tables, and other elements. A cascading style sheet is a type of style sheet. In order to verify a cascading style sheet, it is necessary to extract CSS rules.
For example, a DOM node tree is generated using a markup language, and CSS rules applicable to each DOM node in the DOM node tree are extracted. However, if there are a large number of DOM nodes in the DOM node tree, it may take a great deal of time to extract the CSS rules that are applicable to each of the DOM nodes. Therefore, a method is needed to reduce the time used to extract CSS rules that are applicable to each DOM node.